<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<table class="header" width="100%"  border="0" style="font-size: 12px;">

    <security:authorize ifAnyGranted="ROLE_USER, ROLE_GROUP_MANAGER, ROLE_ADMIN">
        <tr>
            <td align="right" width="100%" height="100%">
                <%-- principal equals com.ixonos.skillnet.logic.security.SkillnetUser
            for example: pricipal.fullName == skillnetUser.getFullName() --%>
                <fmt:message key="header.loggeduser"/>:&nbsp;
                <security:authentication property="principal.fullName"/>&nbsp;[<security:authentication property="principal.username"/>]
                &nbsp;<a href="<c:url value="/logout"/>"><fmt:message key="header.logout"/></a>
            </td>
        </tr>
        <tr>
            <td>&nbsp;
        </tr>
        <tr>
            <td>&nbsp;
        </tr>
    </security:authorize>

    <security:authorize ifNotGranted="ROLE_USER, ROLE_GROUP_MANAGER, ROLE_ADMIN">
        <tr>
            <td align="right" >
                <%@include file="login.jsp" %>
            </td>
        </tr>
    </security:authorize>
    <!--        <tr>
                <td align="right">
    <%-- not needed when LDAP is used
    <jsp:include page="/WEB-INF/jsp/tiles/usermanagement/changePasswordLabel.zul"/>
    --%>
</td>
</tr>-->
</table>